package com.wyz.dao;

import com.wyz.entity.UserInfo;

import java.util.List;

public class UserDao2 extends Dao<UserInfo>{
    public int addUser2(UserInfo u){
        String sql = "insert into user2(name,pwd,sex,tel,bir) values(?,?,?,?,?)";
        Object[] o = {u.getName(),u.getPwd(),u.getSex(),u.getTel(),u.getBir()};
        int i = update(sql, o);
        return i;
    }

    public Object selectUser2(String name,String pwd){
        String sql = "select * from user2 where name=? and pwd=?";
        Object o = SelectMany(sql, UserInfo.class, name, pwd);
        return o;
    }

}
